package com.wanwu.channel.common.enums;

/**
 * @author zhy
 * @date 2020-1-4
 * @descrption 支付宝的退款状态枚举类
 */
public enum AlipayAppRefundStatusEnums {

    REFUND_SUCCESS("REFUND_SUCCESS", "退款成功"),
    REFUND_FAIL("REFUND_FAIL", "退款失败"),

    ;

    private String code;
    private String desc;

    AlipayAppRefundStatusEnums(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static AlipayAppRefundStatusEnums getRefundStatusEnum(String code) {
        for (AlipayAppRefundStatusEnums v : AlipayAppRefundStatusEnums.values()) {
            if (code.equals(v.getCode())) {
                return v;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
